<template>
  <ul v-if="mediaExtends" class="mediainfo">
    <li>
      <span>主播：</span>
      <span>
        <span v-for="(anchor, index) in mediaExtends.anchor" :key="anchor + index">{{anchor}}</span>
      </span>
    </li>
    <li>
      <span>直播状态：</span>
      <span>
        <span v-if="mediaExtends.livestate == 'pending'">等待直播</span>
        <span v-else-if="mediaExtends.livestate == 'live'">直播中</span>
        <span v-else-if="mediaExtends.livestate == 'end'">直播结束</span>
        <span v-else>未知</span>
      </span>
    </li>
    <li>
      <span>直播开始时间：</span>
      <span>{{mediaExtends.starttime}}</span>
    </li>
    <li>
      <span>直播结束时间：</span>
      <span>{{mediaExtends.endtime}}</span>
    </li>
    <li>
      <span>回看地址：</span>
      <span>{{mediaExtends.reviewurl}}</span>
    </li>
    <li>
      <span>直播地址：</span>
      <span>{{mediaExtends.liveurl}}</span>
    </li>
  </ul>
</template>

<script>
  export default {
    name: "ShopCommon",
    props: {
      mediaExtends: {
        type: Object,
        required: true
      }
    }
  }
</script>

<style scoped>
</style>
